<?php


class xt_searchTypeHandler {

    function startElement(phpinchains_parser_psp_PSPParser $sender, $attrs, $line, $file = '') {
        //  type="chooser" name="ma_beteiligtAn_id" referencing="Rechtssubjekt"
        $attrs['label'] = (empty($attrs['label']))?"''":$attrs['label'];
        $attrs['name']  = (empty($attrs['name']))?"''":$attrs['name'];
        $code = "{$attrs['name']} => array('label' => {$attrs['label']}, 'fields' => array(";
        $sender->appendRequestableDataCode($code);
        $sender->appendCode($code);
    }

    function endElement(&$sender) {
        $sender->appendRequestableDataCode(")),");
        $sender->appendCode(")),");
    }

}